package com.example.zhangwei.broadcastreceiver;

import com.example.zhangwei.widgts.NotificationWidget;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class MyReceiver extends  BroadcastReceiver{
	
	private static final String TAG = "MyReceiver"; 
	
	public static final String OPEN_MY_DIALOG = "android.intent.action.my_dialog"; 

	@Override
	public void onReceive(Context context, Intent intent) {
		// TODO Auto-generated method stub
		if ("android.intent.action.my_broadcast".equals(intent.getAction()))
		{
			String msg = intent.getStringExtra("msg");  
	        Log.e(TAG, msg);
	        //弹出通知
	        NotificationWidget.getInstance(context).setNotification(0);
		}
		else
		{
	        Log.e(TAG, "receive no my_broadcast");
		}
		
	}

}
